package com.qys.livesMall.system.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 首页轮播图
 * </p>
 *
 * @author dp
 * @since 2023-05-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("h2_app_home_banner")
@Schema(name = "H2AppHomeBanner对象", description = "首页轮播图")
public class H2AppHomeBanner implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @Schema(name = "banner类型")
    @TableField("type")
    private Integer type;

    @Schema(name = "活动类型")
    @TableField("activity_type")
    private Integer activityType;

    @Schema(name = "关联活动Id/外链url")
    @TableField("activity_Id")
    private String activityId;

    @Schema(name = "开始时间")
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+0")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Object startTime;

    @Schema(name = "结束时间")
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+0")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Object endTime;

    @Schema(name = "活动详情")
    @TableField("detail")
    private String detail;

    @Schema(name = "图片地址")
    @TableField("img")
    private String img;

    @Schema(name = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(name = "更新时间")
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(name = "创建人")
    @TableField("create_by")
    private String createBy;

    @Schema(name = "更新人")
    @TableField("update_by")
    private String updateBy;

    @Schema(name = "是否删除")
    @TableField("deleted")
    @JsonIgnore
    private Boolean deleted;

    @Schema(name = "跳转链接")
    @TableField("url")
    private String url;

    @Schema(name = "状态 0未开启  1已开启")
    @TableField("state")
    private Integer state;
}
